#pragma once

#include <d3dx10.h>
#include <vector>
#include <map>
#include <string>
#include "iCamera.h"
#include "drawableObject.h"
#include "shaderManager.h"



struct SceneObject
{
	DrawableObject	* m_Object;
	D3DXMATRIX m_TranslationMatrix;
	D3DXQUATERNION m_Rotation;
};




//helper class for managing objects in the scene and draw them with proper techniques
class SceneObjectManager
{
private:
	ID3D10Device * m_d3dDevice;
	ShaderManager * m_ShaderManager;
	std::map<std::string,std::vector<SceneObject*>> m_ObjectMap;
	D3DXVECTOR3		m_EyeDirection; //eye direction used to ignore invisible obejcts
	D3DXVECTOR3		m_EyePosition;

	
public:

	SceneObjectManager(ID3D10Device * device, ShaderManager * shaderManager);
	~SceneObjectManager();
	void AddObject(DrawableObject * object, std::string technique, D3DXVECTOR3 position, D3DXQUATERNION rotation );
	void Draw();
	void SetEyeParameters(ICamera * camera);

};